﻿@model S4Store.Models.AfterSaleCarKPI.AfterSaleCarTypeListModel
@{
    ViewBag.Title = "InputCarKpiMonthConfig";
    S4Store.Domain.Administrator CurrentUser = (S4Store.Domain.Administrator)ViewBag.CurrentUser;
    Layout = null;
}
@{int i = 0;}
<form class="pageForm addpage" action="@Url.Action("ModifyBackInputAfterSaleCarTypeKpiDayData")" method="post">
<div style="height: 100%; width: 100%; overflow: hidden" class="verticalSplitContainer">
    <div class="" style="overflow: auto;" ratio="#130">
        <table class="rpttable" style="border-collapse: collapse;">
            <tr height="80"  class="vtr">
                <th class="yellow" ><div class="wd60 pd510"><div class="wd20">车型名称</div> </th></div>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">事故入厂台次</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">维修入厂台次</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">5K保养数</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">10K保养数</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">5K保养实际产值(万)</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">10K保养实际产值(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">其他常态维修产值(万)</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">事故车产值(万)</div></div>
                </th>
                <th class="yellow" ><div class="wd30 pd510"><div class="wd20">用品销售额(万)</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">养护产品销售额(万)</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">首次续保台次</div></div>
                </th>
               <th class="yellow" ><div class="wd30 pd510"><div class="wd20">二次续保台次</div></div>
                </th>
            </tr>
</table>
</div>
<div class="" style="overflow: auto;" ratio="*">
 <table  class="rpttable"  style="border-collapse:collapse;">
            @foreach (var brand in Model.CarBrands)
            {
                var item = Model.AfterSaleCarTypeDayInputs.Where(o => o.CarBrandId == brand.Id).FirstOrDefault();
                if (item == null)
                {
                    item = new S4Store.Domain.AfterSaleKpi.AfterSaleCarTypeDayInput();
                }
                <tr>
                    <td><div class="wd60 pd510">@brand.Name<input type="hidden" name="afterSaleCarDayList[@i].CarBrandId" value="@brand.Id" />
                    </div></td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput" name="afterSaleCarDayList[@i].SGRCTC_AccidentCarToFactory" value="@item.SGRCTC_AccidentCarToFactory" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].WXRCTC_MaintainCarToFactory" value="@item.WXRCTC_MaintainCarToFactory" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarDayList[@i].WKBYS_Maintain5KNum" value="@item.WKBYS_Maintain5KNum" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"  name="afterSaleCarDayList[@i].SQBYS_Maintain10KNum" value="@item.SQBYS_Maintain10KNum" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].WQBYCZ_Maintain5KValue" value="@item.WQBYCZ_Maintain5KValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].SQBYCZ_Maintain10KValue" value="@item.SQBYCZ_Maintain10KValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].QTWXCZ_MaintainOtherValue" value="@item.QTWXCZ_MaintainOtherValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].SGCCZ_AccidentCarValue" value="@item.SGCCZ_AccidentCarValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].JPXSE_BestSaleValue" value="@item.JPXSE_BestSaleValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].YHCPXSE_MaintenanceSaleValue" value="@item.YHCPXSE_MaintenanceSaleValue" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].SCXB_FirstRenewNum" value="@item.SCXB_FirstRenewNum" /></div>
                    </td>
                    <td><div class="wd30 pd510">
                        <input type="text" class="w30 ipt numberinput"   name="afterSaleCarDayList[@i].ECXB_SecondRenewNum" value="@item.ECXB_SecondRenewNum" /></div>
                    </td>
                </tr>

                i++;
            }

        </table>
    </div>
    <input type="hidden" name="y" value="@Model.Date.Year" /> <input type="hidden" name="m" value="@Model.Date.Month" /><input type="hidden" name="d" value="@Model.Date.Day" />
    <div class="formBar" ratio="#30">
    @if (!Model.isconfirmed || CurrentUser.Position == S4Store.Domain.Position.SystemManager)
    {
        <ul>
            <li>
                <div class="simplebutton">
                    <div class="r">
                        <button type="button" class="submit">
                            保存</button></div>
                </div>
            </li>
            <li>确认数据：<input type="checkbox" name="isconfirm" value="true" /></li>
        </ul>
    }
    </div>
    
</form>
